//
//  UIColor+SYAdd.m
//  SYSDK
//
//  Created by ligq on 2020/4/14.
//  Copyright © 2020 synjones. All rights reserved.
//

#import "UIColor+SYAdd.h"

@implementation UIColor (SYAdd)

+ (UIImage*)createImageWithColor:(UIColor*)color{
    CGRect rect=CGRectMake(0, 0, 1, 1);
    UIGraphicsBeginImageContext(rect.size);
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextSetFillColorWithColor(context, [color CGColor]);
    CGContextFillRect(context, rect);
    UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return theImage;
}
@end
